package com.qiaoanju.web.security;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;
import org.springframework.security.core.userdetails.UserDetails;

import java.util.Collection;

/**
 * Created by eversec
 * on 2017/9/22.
 */
public class UserDetail extends User implements UserDetails {

    /**
     *
     */
    private static final long serialVersionUID = -4635779558621710444L;

    private String username;        //用户名（账号）
    private String realname;      //真实姓名

    public UserDetail(String username, String password,Collection<? extends GrantedAuthority> authorities) {
        super(username, password, authorities);
    }

    public UserDetail(String username, String password, boolean enabled,
                      boolean accountNonExpired, boolean credentialsNonExpired,
                      boolean accountNonLocked,
                      Collection<? extends GrantedAuthority> authorities) {
        super(username, password, enabled, accountNonExpired, credentialsNonExpired,
                accountNonLocked, authorities);
    }

}

